package eg.backend.manager;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import eg.backend.domain.Budget;
import eg.backend.domain.Dimension;
import eg.backend.domain.fly.BudgetStatus;

@Transactional
public interface BudgetManager {
	//get budget info for a given tag
	Budget getByTagName(String tagName, Date from, Date to);
	//find budget definition for a given dimension and its children
	Map<String, Float> findCategoryBudgets(Dimension root, Date from, Date to);
	//usage info
	Map<String, BudgetStatus> findCategoryBudgetStatus(Dimension root, Date from, Date to);
	BudgetStatus getBudgetStatusByTag(String tagName, Date from, Date to);
	
	//update definition
	void update(List<Budget> budgets);
}
